package com.codingapi.p2p.client.handler;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * create by lorne on 2018/3/13
 */
public class NettyClientHandler extends ChannelInboundHandlerAdapter{


    private Logger logger = LoggerFactory.getLogger(NettyClientHandler.class);


    @Override
    public void channelActive(ChannelHandlerContext ctx) throws Exception {


        logger.info("connection-->"+ctx);
    }

    @Override
    public void channelInactive(ChannelHandlerContext ctx) throws Exception {


        logger.info("disconnection-->");
    }

}
